package img

import (
	"image/color"
)

type Color struct {
	color.Color
}

func newColor(color color.Color) Color {
	return Color{color}
}

// Avg 颜色平均
func (this Color) Avg(color color.Color) Color {
	r, g, b, _ := this.Color.RGBA()
	r2, g2, b2, _ := color.RGBA()
	return newColor(NewRGB(uint8((r+r2)/2), uint8((g+g2)/2), uint8((b+b2)/2)))
}

//颜色减淡

//颜色加深
